package sandbox.dto;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface AttributeMapping {

    public enum AttributeType {
        AUTO,
        LONG,
        DOUBLE,
        INTEGER,
        STRING,
        DATE,
        PRIMITIVE_COLLECTION,
        OBJECT,
        OBJECT_COLLECTION,
    }

    public String name() default "";
    public String dtoIdField() default "";
    public String entityIdField() default "";
    public AttributeType type() default AttributeType.AUTO;
    public boolean skipDecoding() default false;
    public Class<? extends AttributeConverter> converter() default DirectConverter.class;
}
